#include "DialWidget.h"
#include "ui_DialWidget.h"
#include "smartphone/Smartphone.h"
DialWidget::DialWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DialWidget)
{
    ui->setupUi(this);

}

DialWidget::~DialWidget()
{
    delete ui;
}



void DialWidget::on_btnCall_clicked()
{
    Smartphone::getInstance()->call(ui->lineEdit->text(), MediaTypeAudioVideo, MediaDirectionSendRecv, MediaDirectionSendRecv);
}


void DialWidget::on_btnPlay_clicked()
{
    QWidget *w = new QWidget();

    w->show();
    long player = Smartphone::getInstance()->createLocalPlayer(w->winId());
    Smartphone::getInstance()->openPlayer(player, "record/test.mkv");
    Smartphone::getInstance()->startPlayer(player);
}



void DialWidget::on_btnStop_clicked()
{

}
